import request from '@/utils/request'


// 新增消息
export function addMessage(message) {
    return request({
        url: '/workorder/workorder/addSysMessage',
        method: 'post',
        data: message
    })
}

// 仓库角色获取所有未处理的消息
export function getWarehouseNotifications() {
    return request({
        url: '/recpt/recpt/getWarehouseNotifications',
        method: 'get'
    })
}

// 报工审核角色获取所有未处理的消息
export function getSHNotifications() {
    return request({
        url: '/recpt/recpt/getSHNotifications',
        method: 'get'
    })
}

//修改通知的状态
export function updateNotificationStatus(notificationId, message) {
    return request({
        url: '/recpt/recpt/updateNotificationStatus',
        method: 'get',
        params: { notificationId, message }
    })
}